<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	int pageNo = 1;
	if (request.getParameter("pageNo")!=null){
		pageNo=Integer.valueOf(request.getParameter("pageNo"));
	}
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<s:head />
		<s:i18n name="globalMessages"></s:i18n>
		<base href="<%=basePath%>" />
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<title></title>
		<script type='text/javascript' src='js/jquery-1.4.2.min.js'></script>
		<script type='text/javascript' src='js/jquery.validate.min.js'></script>
		<script type='text/javascript' src='js/common.js'></script>
		<script type='text/javascript' src='js/jquery-ui-1.7.3.custom.min.js'></script>  
		<link href="style/ui-lightness/jquery-ui-1.7.3.custom.css" rel="stylesheet" type="text/css">
		<link href="style/index.css" rel="stylesheet" type="text/css" />
		<link href="style/valid.css" rel="stylesheet" type="text/css" />
		<link href="images/css.css"  rel="stylesheet" type="text/css" />
			<style type="text/css">
				a:link {
					text-decoration: none;
				}
				a:visited {
					text-decoration: none;
				}
				a:hover {
					text-decoration: none;
				}
				a:active {
					text-decoration: none;
				}
				.STYLE10 {
					font-size: 14px;
					font-weight: bold;
				}
		</style>
		<script type=text/javascript>
		//转至多少页码
		 function changePage(pageNo, typeid, groupid)
		 {
		 	//alert(listId);
		  window.location.href="indexAction!findByTypeAndGroup.action?pageNo=" +pageNo + "&typeId=" + typeid + "&groupId=" + groupid ;
		 } 
		function initYulan() {
			var arr = $(".yulancls");
			$.each( arr, function(i, el){
				 var divHeight = $(".zhenshu" + $(el).attr("msgid")).length * 240;
				 $(el).dialog({title:"彩信预览", resizable:false,  width: divHeight,autoOpen: false});
			}); 
			
		}

		 //预览
		   function previewMsg(idx) {
			   $("#yulanDiv" + idx).dialog('open');
		   }

		   function openYulan(msgid) {
		   }

		   function jumpPage(pageNo) {
			   document.getElementById("pageNo").value = pageNo;
			   document.getElementById("suofrm").submit();
		   }
		</script>
	</head>
<body  bgcolor="#F1F1F1" style="margin:0px; text-align:center;">
<div style="margin: 5px;">
<s:if test="#session.userObject.type==0 && #request.typeObj.useUsertype==2">
	<table>
	<td width="789" valign="middle" height="96" align="left"><table width="787" height="84" cellspacing="0" cellpadding="0" border="0" bgcolor="#FFFFFF" style="border:1px solid #C5C5C5; ">
      <tbody><tr>
        <td width="155" height="82" align="center"><img width="74" height="58" src="images/ym.jpg"></td>
        <td width="632" style="line-height:25px;">很抱歉，本版块应用仅供‘VIP会员’使用<br>
          您可以<a href="pay.jsp"> 升级为VIP </a>后再尝试使用本版块应用</td>
      </tr>
    </tbody></table></td>
	</table>
</s:if>
<table width="990" height="372" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="790" align="left" valign="top">
    <table width="789" height="541" border="0" cellpadding="0" cellspacing="0" bgcolor="#F1F1F1">
  <tr>
    <td height="511" align="center" valign="top" bgcolor="#FFFFFF" style="border:1px solid #C5C5C5; padding:1px ;"><table width="100%" height="32" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="1%" height="32" background="images/sp_bg.jpg">&nbsp;</td>
        <td width="3%" align="center" background="images/sp_bg.jpg" style="border-bottom:1px solid #C5C5C5;"><img src="images/dian.jpg" width="10" height="16" /></td>
        <td width="95%" align="left" background="images/sp_bg.jpg" style="border-bottom:1px solid #C5C5C5;"><span class="STYLE3">${typeObj.name}</span></td>
        <td width="1%" background="images/sp_bg.jpg">&nbsp;</td>
      </tr>
    </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="8">&nbsp;</td>
        </tr>
      </table>
      
     <table  border="0" cellpadding="0" cellspacing="0" align="left">
<div id="images">


<s:if test="pageObj.data!=null  && pageObj.data.size()>0">
<tr>
 <s:iterator value="pageObj.data" id="msg" status="st">
	<td align="left" style="border: 0px;">
	<table align="left" style="border: 0px;" cellpadding="0" cellspacing="0">
		<tr>
			<td width="150" height="85" align="center">
				<s:if test="#msg.manageMsgDetails ==null || #msg.manageMsgDetails.size()==0 || #msg.manageMsgDetails[0]==null || #msg.manageMsgDetails[0].pic == null || #msg.manageMsgDetails[0].pic ==''">
                 			<img src="images/default_msg_pic.jpg"  style="height: 106px;width: 126px;"/>
                 		</s:if>
                 		<s:else>
                 				<img src="<s:property value="#msg.manageMsgDetails[0].pic"/>"  style="height: 106px;width: 126px;" />
                 		</s:else>
			</td>
		</tr>
		<tr >
  			<td height="24" align="left"><span class="STYLE11" style="height:30px; padding-left:10px;">${msg.title}</span></td>
  		</tr>
  		<tr>
  			<td height="28" align="right" class="di_ys ry_di" style="padding: 0px; margin: 0px;" >
  			<s:if test="#msg.canSend">
      			<a href="msg!sendPage.action?first=1&mubanId=${msg.id}"  >发送</a>&nbsp;&nbsp;&nbsp;&nbsp;
      		</s:if>
  			<a href="mobanListAction!yulan.action?id=${msg.id }" target="_blank">预览</a>&nbsp;&nbsp;&nbsp;&nbsp;
  			</td>
  		</tr>
  		 <tr>
          <td height="8">&nbsp;</td>
        </tr>
	</table>
</td>
<s:if test="(#st.index+1)%5==0"></tr><tr></s:if>
<s:if test="(#st.index+1) ==pageObj.data.size()"></tr> </s:if>
</s:iterator>
</s:if>



<tr >
  <td height="36" colspan="5" align="right">
  
  	<table width="100%" border="0" cellspacing="0" cellpadding="0" height="7" align="right">
          <s:if test="pageObj.data != null">
			<s:if test="pageObj.hasOnePage==false">
			<form action="indexAction!findByTypeAndGroup.action?typeId=${typeId}&groupId=${groupId}" method="post" id="suofrm" name="suofrm">
			<input type="hidden" name="likeName" value="${likeName}" />
			<input type="hidden" name="pageNo" id="pageNo" />
			</form>
            <tr>
              <td height="29" colspan="13" align="right" background="images/lm1_bg.jpg" >
              <s:if test="pageObj.pageNo==1">首页</s:if>
			  <s:else>
				  <a href="javascript:jumpPage(1)" class="STYLE5">首页</a> 
			  </s:else>&nbsp;
              
              <s:if test="pageObj.hasPrePage==false">上一页</s:if>
			  <s:else> 
				 <a href="javascript:jumpPage(<s:property value="pageObj.pageNo-1"/>)" class="STYLE5">上一页</a>
			  </s:else>&nbsp;

              <s:if test="pageObj.hasNextPage==false">下一页</s:if>
		      <s:else>
				 <a href="javascript:jumpPage(<s:property value="pageObj.pageNo+1"/>)" class="STYLE5">下一页</a>
			  </s:else>&nbsp;
              
              <s:if test="pageObj.pageNo==pageObj.totalPage">末页</s:if>
			  <s:else>
			    <a href="javascript:jumpPage(<s:property value="pageObj.totalPage"/>)" class="STYLE5"> 末页 </a>
			  </s:else>
              
              &nbsp;&nbsp;第${pageObj.pageNo}页&nbsp;|&nbsp;
                                    共<s:property value="pageObj.totalPage"/>页&nbsp;|&nbsp;
                                    共${pageObj.totalRecord}条&nbsp;&nbsp;转至&nbsp;
    			<select onchange="jumpPage(this.value)" id="pageNo2" name="pageNo">
    				<s:iterator value="pageObj.listNum" id="msgid" status="st">
    					<option value="<s:property value="pageObj.listNum[#st.index]"/>"><s:property value="pageObj.listNum[#st.index]"/></option>
    				</s:iterator>
    			</select>&nbsp;&nbsp;
    		</td>
            </tr>
             </s:if>
             <s:else>
				<%--<font class="tip" style="font-size: large;">暂无消费明细!</font>--%>
				<tr>
	              <td   >
				 	 
	    		  </td>
	            </tr>
		     </s:else>
  		</s:if>
  		<s:else>
	  		<tr>
		        <td height="29" colspan="13" align="right" background="images/lm1_bg.jpg" >
					<p style="color: red;font-size: 12px;text-align: center;">暂无记录!</p>
		    	</td>
		    </tr>	 
  		</s:else>	 
          
        </tr>
      </table>
  
  </td>
  </tr>
</div>
</table>
     
      </td>
  </tr>
</table>    </td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="32">&nbsp;</td>
  </tr>
</table>
</div>

 <script type="text/javascript" defer="defer">
	var pageNoTmp = "<%=pageNo%>";
	$("#pageNo2").val(pageNoTmp);
 </script>
</body>
</html>
